﻿@using SCMS.Resources
@model SCMS.UI.Models.BudgetSubLine
@{AjaxOptions ajaxOpts = new AjaxOptions
  {
      UpdateTargetId = "budgetDiv",
      LoadingElementId = "loading",
      HttpMethod = "Post",
      Url = Url.Action("SaveSubLine"),
      OnSuccess = "ClearForm"
  };}
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Ajax.BeginForm(null, null, ajaxOpts, new { @class = "form" }))
{ 
    <table>
        <tbody>
            <tr>
                <td align="right">@Resources_frank.Budget_CategoryList_CategoryNo.:</td>
                <td>
                    @Html.DisplayFor(model => model.BudgetCategoryNumber)
                    @Html.DisplayFor(model => model.BudgetCategoryDesc)
                </td>
            </tr>
            <tr>
                <td align="right">@Resources_frank.Budget_CreateSubLine_LineNumber<font color="red">*</font>:</td>
                <td>
                    @Html.TextBoxFor(model => model.LineNumber, new { @autocomplete = "off"})<br />
                    @Html.ValidationMessageFor(model => model.LineNumber)
                </td>
            </tr>
            <tr>
                <td align="right">@Resources_frank.Global_String_Description<font color="red">*</font>:</td>
                <td>
                    @Html.TextBoxFor(model => model.Description, new { @autocomplete = "off"})<br />
                    @Html.ValidationMessageFor(model => model.Description)
                </td>
            </tr>
            <tr>
                <td align="right">@Resources_frank.Budget_CategoryList_BudgetAmount<font color="red">*</font>:</td>
                <td>
                    @Html.TextBoxFor(model => model.TotalBudget, new { id="amount", @class = "numericTb", @autocomplete = "off"})<br />
                    @Html.ValidationMessageFor(model => model.TotalBudget)
                </td>
            </tr>            
            <tr>
                <td></td>
                <td>
                    @Html.HiddenFor(model => model.SubLineId)
                    @Html.HiddenFor(model => model.EntityBudgetSubLine.Id)
                    @Html.HiddenFor(model => model.BudgetCategoryId)
                    <input type="submit" class="btn green"  value="@ViewBag.ButtonText" />&nbsp;
                    <input type="button" class="btn green"  value="@Resources_frank.Global_String_Cancel" onclick="javascript:CloseDialog()" />
                </td>
            </tr>
         </tbody>
    </table>
}  
